#pragma once

template<class T>
class CCustomPoint
{
public:
	CCustomPoint(): m_x(0), m_y(0) {};
	CCustomPoint(T x, T y): m_x(x), m_y(y) {};
	CCustomPoint(CPoint pt): m_x(pt.x), m_y(pt.y) {};

	CPoint GetPoint(CPoint pt) const
	{
		return CPoint(
			int(pt.x * m_x),
			int(pt.y * m_y));
	};

	T GetDist(T x, T y) const
	{
		T dx(x - m_x);
		T dy(y - m_y);
		T res (dx*dx + dy*dy);
		res = sqrt(res);
		return res;
	};
	T GetDist(const CCustomPoint &pt) const 
	{
		return GetDist(pt.m_x, pt.m_y); 
	};
public:
	T	m_x;
	T	m_y;
};
typedef CCustomPoint<double> CPointDouble;